<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>EOS.IO: native::eos Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="eos-logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">EOS.IO
   &#160;<span id="projectnumber">DAWN1.1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacenative.html">native</a></li><li class="navelem"><a class="el" href="structnative_1_1eos.html">eos</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classnative_1_1eos-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">native::eos Class Reference<div class="ingroups"><a class="el" href="group__eoscontract.html">EOS Contract</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>A <em>native</em> currency contract implemented with account named <code>eos</code>  
 <a href="structnative_1_1eos.html#details">More...</a></p>
<div class="dynheader">
Inheritance diagram for native::eos:</div>
<div class="dyncontent">
<div class="center"><img src="structnative_1_1eos__inherit__graph.png" border="0" usemap="#native_1_1eos_inherit__map" alt="Inheritance graph"/></div>
<map name="native_1_1eos_inherit__map" id="native_1_1eos_inherit__map">
<area shape="rect" id="node2" href="structnative_1_1contract.html" title="Defines the base class for all contracts. " alt="" coords="5,5,117,32"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for native::eos:</div>
<div class="dyncontent">
<div class="center"><img src="structnative_1_1eos__coll__graph.png" border="0" usemap="#native_1_1eos_coll__map" alt="Collaboration graph"/></div>
<map name="native_1_1eos_coll__map" id="native_1_1eos_coll__map">
<area shape="rect" id="node2" href="structnative_1_1contract.html" title="Defines the base class for all contracts. " alt="" coords="5,5,117,32"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a972dd49fcfaba33fb88c8e458f55d168"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structnative_1_1eos.html#a972dd49fcfaba33fb88c8e458f55d168">transfer</a> (<a class="el" href="group__types.html#gad67b43dc23285b01176f4c181c59fc23">AccountName</a> from, <a class="el" href="group__types.html#gad67b43dc23285b01176f4c181c59fc23">AccountName</a> to, <a class="el" href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a> amount)</td></tr>
<tr class="memdesc:a972dd49fcfaba33fb88c8e458f55d168"><td class="mdescLeft">&#160;</td><td class="mdescRight">This action will transfer funds from one account to another.  <a href="#a972dd49fcfaba33fb88c8e458f55d168">More...</a><br /></td></tr>
<tr class="separator:a972dd49fcfaba33fb88c8e458f55d168"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_structnative_1_1contract"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_structnative_1_1contract')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="structnative_1_1contract.html">native::contract</a></td></tr>
<tr class="memitem:a4422c14a4842b5d25917b7dbda0e7dc2 inherit pub_methods_structnative_1_1contract"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structnative_1_1contract.html#a4422c14a4842b5d25917b7dbda0e7dc2">setcode</a> (Bytes code, Abi abi, <a class="el" href="group__types.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> vm=0, <a class="el" href="group__types.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> vm_version=0) final</td></tr>
<tr class="memdesc:a4422c14a4842b5d25917b7dbda0e7dc2 inherit pub_methods_structnative_1_1contract"><td class="mdescLeft">&#160;</td><td class="mdescRight">updates the code that will be executed for this contract  <a href="#a4422c14a4842b5d25917b7dbda0e7dc2">More...</a><br /></td></tr>
<tr class="separator:a4422c14a4842b5d25917b7dbda0e7dc2 inherit pub_methods_structnative_1_1contract"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a74eb5f9ef72cb07a653e0c0e0c409c82 inherit pub_methods_structnative_1_1contract"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structnative_1_1contract.html#a74eb5f9ef72cb07a653e0c0e0c409c82">setauth</a> (Name permission, Name parent, Authority auth) final</td></tr>
<tr class="memdesc:a74eb5f9ef72cb07a653e0c0e0c409c82 inherit pub_methods_structnative_1_1contract"><td class="mdescLeft">&#160;</td><td class="mdescRight">updates the authority required for a named permission  <a href="#a74eb5f9ef72cb07a653e0c0e0c409c82">More...</a><br /></td></tr>
<tr class="separator:a74eb5f9ef72cb07a653e0c0e0c409c82 inherit pub_methods_structnative_1_1contract"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab734182ae6b1e92c2fe1a55f12418961 inherit pub_methods_structnative_1_1contract"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structnative_1_1contract.html#ab734182ae6b1e92c2fe1a55f12418961">setperm</a> (Name con, Name act, Name myperm)</td></tr>
<tr class="memdesc:ab734182ae6b1e92c2fe1a55f12418961 inherit pub_methods_structnative_1_1contract"><td class="mdescLeft">&#160;</td><td class="mdescRight">set the local named permission required for <code>this</code> account/contract to call <code>con::act(...)</code>  <a href="#ab734182ae6b1e92c2fe1a55f12418961">More...</a><br /></td></tr>
<tr class="separator:ab734182ae6b1e92c2fe1a55f12418961 inherit pub_methods_structnative_1_1contract"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>The EOS contract is a <em>native</em> currency contract implemented with account named <code>eos</code>. This contract enables users to transfer EOS tokens to each other. This contract is designed to work the stakedcontract and systemcontract when creating new accounts, claiming staked EOS. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a972dd49fcfaba33fb88c8e458f55d168"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void native::eosio::transfer </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#gad67b43dc23285b01176f4c181c59fc23">AccountName</a>&#160;</td>
          <td class="paramname"><em>from</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#gad67b43dc23285b01176f4c181c59fc23">AccountName</a>&#160;</td>
          <td class="paramname"><em>to</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a>&#160;</td>
          <td class="paramname"><em>amount</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="section pre"><dt>Precondition</dt><dd><code>from</code>'s balance must be greaterthan or equal to <code>amount</code> transferred. </dd>
<dd>
The amount transferred must be greater than 0 </dd>
<dd>
<code>to</code> and <code>from</code> may not be the same account.</dd></dl>
<h3>Required Authority </h3>
<p>This action requires the authority of the <code>from</code> account.</p>
<h3>Required Scope </h3>
<p>This action requires access to <code>from</code> and <code>to</code> account scopes. It does not require access to the <code>eos</code> scope which means that multiple transfers can execute in parallel as long as they don't have any overlapping scopes.</p>
<h3>Required Recipients </h3>
<p>This message requires that the accounts <code>from</code> and <code>to</code> are listed in the required recipients. This ensures other contracts are notified anytime EOS tokens are transferred. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">from</td><td>account from which EOS will be withdrawn </td></tr>
    <tr><td class="paramname">to</td><td>account to receive EOS, may not be same as <code>from</code> </td></tr>
    <tr><td class="paramname">amount</td><td>must be greater than 0 and less or equal to <code>from</code>'s balance </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>contracts/eos/<a class="el" href="eos_8cpp.html">eos.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
